function supportController(){
    this.checkMinSupport = function(){
        return this.checkCanvasSupport() && this.checkWebStorageSupport();
    }
    
    
    // le funzioni seguenti sono tutte tratte da:
    // http://www.programmazione.it/index.php?entity=eitem&idItem=44663
    
    this.checkCanvasSupport = function(){
        var canvas = document.createElement("canvas");
//        window.alert("getContext" in canvas ? "canvas ok" : "canvas no");
        return "getContext" in canvas;
    }
    
    this.checkWebStorageSupport = function(){
//        window.alert(typeof window.localStorage == "object" && typeof window.sessionStorage == "object" ? "webstorage ok" : "webstorage no");
        return typeof window.localStorage == "object" && typeof window.sessionStorage == "object";
    }
    
    this.checkOfflineSupport = function(){
//        window.alert(!!window.applicationCache ? "offline ok" : "offline no");
        return !!window.applicationCache;
    }
    
    this.checkGeolocationSupport = function(){
//        window.alert(!!navigator.geolocation ? "geoloc ok" : "geoloc no");
        return !!navigator.geolocation;
    }
}


